package com.xxh.dasongapp.common.param;

import com.xxh.dasongapp.common.validgroup.Insert;
import com.xxh.dasongapp.common.validgroup.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="资源参数",description="资源参数")
public class ResourcePARAM implements Serializable {
    private static final long serialVersionUID = 1L;

    @NotBlank(message = "id不能为空", groups = Update.class)
    @ApiModelProperty(value = "资源id")
    private String id;

    @NotEmpty(message = "资源名不能为空",groups = Insert.class)
    @ApiModelProperty(value = "资源名")
    private String name;

    @NotEmpty(message = "资源类型不能为空",groups = Insert.class)
    @ApiModelProperty(value = "资源类型")
    private String type;

    @NotEmpty(message = "资源介绍不能为空",groups = Insert.class)
    @ApiModelProperty(value = "资源介绍")
    private String introduce;

    @NotEmpty(message = "资源照片不能为空",groups = Insert.class)
    @ApiModelProperty(value = "资源照片名")
    private String imgFile;

    @NotEmpty(message = "资源照片不能为空",groups = Insert.class)
    @ApiModelProperty(value = "资源下载地址")
    private String downloadUrl;

    @ApiModelProperty(value = "资源提取码")
    private String downloadPassword;

    @ApiModelProperty(value = "资源介绍地址")
    private String introduceUrl;

    @NotNull(message = "是否隐藏不能为空",groups = Insert.class)
    @ApiModelProperty(value = "1：隐藏,0:不隐藏")
    private Integer isHide;
}
